﻿namespace embPDFUtils
{
    using System.Collections.Generic;

    /// <summary>
    /// Interface for the different PDF
    /// libraries
    /// </summary>
    public interface IPdfDocumentTools
    {
        /// <summary>
        /// Creates the PDF from single file.
        /// </summary>
        /// <param name="size">The size.</param>
        /// <param name="directory">The directory.</param>
        /// <param name="fileName">Name of the file.</param>
        /// <param name="imagePath">The image path.</param>
        /// <param name="overwrite">if set to <c>true</c> [overwrite].</param>
        void CreatePdfFromSingleImageFile(iTextSharp.text.Rectangle size, string directory, string fileName, string imagePath, bool overwrite);

        /// <summary>
        /// Creates the PDF from multiple files.
        /// </summary>
        /// <param name="size">The size.</param>
        /// <param name="directory">The directory.</param>
        /// <param name="fileName">Name of the file.</param>
        /// <param name="imagePath">The image path.</param>
        /// <param name="filter">The filter.</param>
        void CreatePdfFromMultipleImageFiles(iTextSharp.text.Rectangle size, string directory, string fileName, string imagePath, string filter = "*.*");

        /// <summary>
        /// Appends the single image to existing PDF.
        /// </summary>
        /// <param name="sourceFileDirectory">The source file directory.</param>
        /// <param name="sourceFileName">Name of the source file.</param>
        /// <param name="destinationFileDirectory">The destination file directory.</param>
        /// <param name="destinationFileName">Name of the destination file.</param>
        /// <param name="imageFileName">Name of the image file.</param>
        void AppendSingleImageToExistingPdf(string sourceFileDirectory, string sourceFileName, string destinationFileDirectory, string destinationFileName,
                                                            string imageFileName);

        /// <summary>
        /// Appends the single image to existing PDF copy version.
        /// </summary>
        /// <param name="sourceFileDirectory">The source file directory.</param>
        /// <param name="sourceFileName">Name of the source file.</param>
        /// <param name="destinationFileDirectory">The destination file directory.</param>
        /// <param name="destinationFileName">Name of the destination file.</param>
        /// <param name="endProduct">The end product.</param>
        /// <param name="imageFileName">Name of the image file.</param>
        void AppendSingleImageToExistingPdfCopyVersion(string sourceFileDirectory, string sourceFileName,
                                                                       string destinationFileDirectory, string destinationFileName,
                                                                       string endProduct,
                                                                       string imageFileName);

        /// <summary>
        /// Extracts the PDF page range.
        /// </summary>
        /// <param name="pageRanges">The page ranges.</param>
        /// <param name="sourceFileDirectory">The source file directory.</param>
        /// <param name="sourceFilename">The source filename.</param>
        /// <param name="destinationFileDirectoy">The destination file directoy.</param>
        /// <param name="destinationFileName">Name of the destination file.</param>
        /// <returns></returns>
        string ExtractPdfPageRange(
            string pageRanges,
            string sourceFileDirectory,
            string sourceFilename,
            string destinationFileDirectoy,
            string destinationFileName
            );


        /// <summary>
        /// Concatenates the multiple PDF files.
        /// </summary>
        /// <param name="sourceFiles">The source files.</param>
        /// <param name="destinationFilePath">The destination file path.</param>
        /// <param name="destinationFileName">Name of the destination file.</param>
        /// <returns></returns>
        string ConcatenateMultiplePdfFiles(
            List<string> sourceFiles, string destinationFilePath, string destinationFileName);
    }
}